package com.yiya.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yiya.bean.CompanyUserInfo;
import com.yiya.model.CompanyUserInfoExample;

public interface CompanyUserInfoMapper {
    int countByExample(CompanyUserInfoExample example);

    int deleteByExample(CompanyUserInfoExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(CompanyUserInfo record);

    int insertSelective(CompanyUserInfo record);

    List<CompanyUserInfo> selectByExample(CompanyUserInfoExample example);

    CompanyUserInfo selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CompanyUserInfo record, @Param("example") CompanyUserInfoExample example);

    int updateByExample(@Param("record") CompanyUserInfo record, @Param("example") CompanyUserInfoExample example);

    int updateByPrimaryKeySelective(CompanyUserInfo record);

    int updateByPrimaryKey(CompanyUserInfo record);
    
    /**
     * 根据用户id获取单位用户信息
     * @param userId
     * @return
     */
    CompanyUserInfo selectByUserId(int userId);
    
    /**
     * 根据用户id获取单位用户信息数量
     * @param userId
     * @return
     */
    int getCpyUserInfoCountByUserId(int userId);
}